<%@page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HXNT IP网络质量及应用监测系统</title>
<meta name="author" content="Simon Shu" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/easyui/themes/myself/easyui.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/easyui/themes/icon.css" />
<%@ include file="../common/taglibs.jsp"%>
<%@ include file="../common/meta.jsp"%>
<script>
	function expandAll(){
	    var node = $('#menuTree').tree('getSelected');
	    if (node) {
	        $('#menuTree').tree('expandAll', node.target);
	    }
	    else {
	        $('#menuTree').tree('expandAll');
	    }
	}
	function getChecked(){
		var nodes = $('#menuTree').tree('getChecked');
		var s = '';
		for (var i = 0; i < nodes.length; i++) {
		    if (s != '') 
		        s += ',';
		    s += nodes[i].id;
		}
		alert(s);
	}

	$(function() {
		$("#roleTree").tree({
			url : './list.action',
			animate: true,		
			
			onClick : function(node) {
				$("#content").attr("src","./menuAuth.action?roleId=" + node.id);
			}
		});
	});
</script>
</head>
<body class="easyui-layout">
	<div id="tree"
		data-options="region:'west',title:'角色',split:true,border:false"
		style="padding: 3px 8px 10px 3px; overflow: hidden; margin: 0; width: 250px;">
		<ul class="easyui-tree" id="roleTree" />
	</div>
	<div
		data-options="region:'center',title:'权限详情',fit:true,border:false"
		style="padding: 5 5 0 5px; background: #edf7ff">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'center',border:false"
				style="text-align: left; background: #efefef">
				<iframe id="content" width="100%" height="100%"
					frameborder="0" scrolling="auto" marginheight="0" marginwidth="0" />
			</div>
			<div data-options="region:'south',border:false" style="width: 80%"
				style="text-align: center; background: #efefef">
				<input type="button" value="保存"
							class="easyui-linkbutton" onclick="expandAll()" />
				<input type="button" value="重置"
							class="easyui-linkbutton" onclick="getChecked()" />
			</div>
		</div>
	</div>
</body>
</html>
